﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.IO;
using FileDFS.Model.Enum;
using System.ServiceModel;

namespace FileDFS.Model
{
    [Serializable]
    [MessageContract]
    public class ImageUploadModel
    {

        /// <summary>
        /// 唯一标识
        /// </summary>
        [MessageHeader]
        public int Id { get; set; }

        /// <summary>
        /// 是否生成缩略图
        /// </summary>
        [MessageHeader]
        public bool CreateThumbnail { get; set; }
        /// <summary>
        /// 扩展名
        /// </summary>
        [MessageHeader]
        public ImageExtensionEnum ImageExtension { get; set; }
        /// <summary>
        /// 生成缩略图的详情
        /// </summary>
        [MessageHeader]
        public List<ThumbnailModel> ThumbnailList { get; set; }
        /// <summary>
        /// 是否为公开的,如果公开的则存放在公开文件夹上,如果为私有的则存放在私有文件夹下
        /// </summary>
        [MessageHeader]
        public bool IsPublic { get; set; }

        ///// <summary>
        ///// 缩略图
        ///// </summary>
        //[MessageBodyMember]
        //public ImageUploadHeader Header { get; set; }

        /// <summary>
        /// 实体
        /// </summary>
        [MessageBodyMember]
        public Stream DataSource { get; set; }

    }
}
